<!doctype html>

<html>

<head>
<meta charset="UTF-8">
<title>sign in</title>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<style>

        body{
        
            background-color: #97CBFF;
           
           }



div{
    
    background:#009FCC;
   
    font-size:24px;
   
    padding:5px;
    
    color:white;

}
form{
   
      background: #97CBFF ;
  
      border:#357FC4 solid 1px;
    
      color:#575454;  
   
      width:400px;
    
      margin:20px auto;
    
      font-size:15px;

}

table{
    margin:10px auto;
}
a{
    text-decoration:none;
}

input[type="button"]{
    background:#228B22;
    color:white;
    font-

size:15px;
    font-weight:bold;
    width:120px;
    height:40px;
}
td:first-

child{
    text-align:right;
    padding:0 5px;
}
td:only-child{
    text-

align:center;
    font-size:12px;
}

span:before{
    content:"* ";
    color:red;
}

input[type="text"]:read-only{
    border:#888484 solid 2px;
    

background:#888484;
    font-weight:bold;   
}

input[type="text"]:hover{
    background:#EFD9AC;
}

</style>

<script>

  function insertScore()
  {
	  var sid=$("#aid").val();
	  var cid=$("#acno").val();
	  var sscore=$("#ascore").val();
	  
		 
		 $.ajax({
	    	 url: "/insertScore",
			 data:{"sno": sid,"cno": cid,"score": sscore},
			 type:"post"
	 })
	    alert("录入成功!");
	  
  }
</script>

</head>

<body>

<form>

<div>学生成绩录入</div>

<table>
       
<tr>
<td><span>学号</span></td>
<td><input type="text" name="sno" id="aid"/></td>
</tr>   

<tr>
<td><span>课程号</span></td>
<td><input type="text" name="cno" id="acno"/></td>
</tr>  

<tr>
<td><span>成绩</span></td>
<td><input type="text" name="score" id="ascore"/></td>
</tr>  
 
   
<tr>
<td colspan="2"><input type="button" name="submit" value="确定"  onclick="insertScore()"/></td>
</tr>

<tr>
<td colspan="2"><input type="button" name="submit" value="返回" onclick="location.href='teacher.html'"/></td>
</tr>

</table>

</form>

</body>

</html>
